import dayjs from '@/components/dayjs';
import { Ellipsis } from '@/components/Ellipsis';
import '@/pages/design/style.less';
import type { tabType } from '@/pages/product/components/interfaceProduct';
import {
  confirmDrawingReview,
  exportDrawingReview,
  getDrawingInfoPreviewUrl,
  getDrawingReviewByPage,
} from '@/services/design/drawingReview';
import {
  downloadProductDrawingInfo,
  getDrawingTypeList,
} from '@/services/design/productDrawingInfo';
import { tableSearchPublicConfig } from '@/utils/filterUtils';
import { filterTranNew, sortTran } from '@/utils/requestUtil';
import { PlusOutlined } from '@ant-design/icons';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import type { ActionType, ProColumns } from '@ant-design/pro-table';
import ProTable from '@ant-design/pro-table';
import {
  Button,
  Col,
  Form,
  Input,
  InputNumber,
  message,
  Modal,
  notification,
  Row,
  Select,
  Tabs,
} from 'antd';
import React, { useEffect, useRef, useState } from 'react';
import { history, useModel } from 'umi';
const DrawingReview: React.FC<{}> = () => {
  const actionRef = useRef<ActionType>();
  const [modalVisit, setModalVisit] = useState(false); // 新建和编辑提示框
  const [modalVisit2, setModalVisit2] = useState(false); // 查看
  const [confirmLoading, setConfirmLoading] = useState(false); //编辑框的disable
  const [formTitle, setFormTitle] = useState('审核');
  const [currentRecordVersion, setCurrentRecordVersion] = useState([]); //保存当前点击的版本,下标为0是主版本号,下标为1是主版本号
  const [createOrUpdate, setCreateOrUpdate] = useState(false); //编辑框的disable
  const [form] = Form.useForm();
  const ref = useRef(null);
  const dateFormat = 'YYYY-MM-DD';
  const [currentRecord, setCurrentRecord] = useState(null); //当前选中的图纸审核列
  const [editVersion, setEditVersion] = useState(false); //用于判断是否可以手动修改版本
  const [tempReviewState, setTempReviewState] = useState(); //暂时存储选择的
  const [handlenumber, sethandlenumber] = useState(''); //待审批的数量

  const { initialState } = useModel('@@initialState'); //hooks获取全局的共享的当前用户信息
  const [userRole, setUserRole] = useState<string[]>(); //当前用户的身份

  useEffect(() => {
    try {
      if (!initialState?.currentUser) {
        history.replace('/user/login');
        notification.error({
          message: '获取用户信息失败',
          description: '获取用户信息失败，将跳回到登录页面',
        });
        throw new Error('获取用户信息失败');
      }
      console.log('initialState', initialState);
      setUserRole(initialState.roleInfo);
    } catch (err) {
      console.log(err);
    }
  }, []);

  const columns: ProColumns[] = [
    {
      title: '序号',
      dataIndex: 'index',
      valueType: 'index',
      width: 80,
    },
    {
      title: '项目名称',
      dataIndex: 'projectName',
      align: 'center',
      sorter: true,
      render: (text) => <>{Ellipsis(text)}</>,
    },
    {
      title: '变更状态',
      dataIndex: 'changeOrAdd',
      align: 'center',
      sorter: true,
      search: false,
      render: (text, record, _, action) => {
        let color = 'status-color-white base-status';
        let word = '原始';
        if (text === '1') {
          color = 'status-color-green base-status';
          word = '新增';
        } else if (text === '2') {
          color = 'status-color-yellow base-status';
          word = '变更';
        }
        return <div className={color}></div>;
      },
    },
    {
      title: '图纸类别',
      dataIndex: 'category',
      align: 'center',
      sorter: true,
      width: 150,
      render: (text) => <>{Ellipsis(text)}</>,
      valueType: 'select',
      request: async () => {
        const gettype = await getDrawingTypeList(null);
        const productfiletype: any[] = [];
        gettype.data.map((item: any, index: any) => {
          productfiletype.push({ value: item, label: item });
        });
        return productfiletype;
      },
    },
    // {
    //   title: '图纸编号',
    //   dataIndex: 'drawingCode',
    //  align: 'center',sorter: true,
    //   render: (text) => <>{Ellipsis(text)}</>,
    // },
    {
      title: '图纸名称',
      dataIndex: 'drawingName',
      align: 'center',
      sorter: true,
      render: (text) => <>{Ellipsis(text)}</>,
      /*       render: (text, record) => (
        <a
          onClick={async (event) => {
            event.preventDefault();
            const url = await getDrawingInfoPreviewUrl(record);
            window.open(url.message);
          }}
        >
          {Ellipsis(text)}
        </a>
      ), */
    },
    /*     {
      title: '变更状态',
      dataIndex: 'changeStatus',
      align: 'center',
      sorter: true,
      width: 100,
      render: (text, record, _, action) => {
        return (
          <div>
            {record.changeStatus == 0 ? '待审核' : record.changeStatus == 2 ? '审核通过' : '已驳回'}
          </div>
        );
      },
      search: false,
    }, */
    {
      title: '审核描述',
      dataIndex: 'memo',

      align: 'center',
      sorter: true,
      render: (text) => <>{Ellipsis(text)}</>,
      search: false,
    },
    // {
    //   title: '柜体图纸序号',
    //   dataIndex: 'drawingSequence',
    //  align: 'center',sorter: true,
    //   render: (text) => <>{Ellipsis(text)}</>,
    // },
    // {
    //   title: '柜体图纸描述',
    //   dataIndex: 'drawingSpec',
    //  align: 'center',sorter: true,
    //   render: (text) => <>{Ellipsis(text)}</>,
    // },
    // {
    //   title: '柜体图纸链接',
    //   dataIndex: 'drawingUrl',
    //  align: 'center',sorter: true,
    //   render: (text) => <>{Ellipsis(text)}</>,
    // },
    {
      title: '产品/柜体编号',
      dataIndex: 'productCode',
      align: 'center',
      sorter: true,
      render: (text) => <>{Ellipsis(text)}</>,
    },
    {
      title: '版本',
      dataIndex: 'version',
      align: 'center',
      sorter: true,
      width: 100,
      // valueType: 'digit',
      render: (text) => <>v{text}</>,
    },
    {
      title: '创建人', //表头显示的名称
      search: false,
      dataIndex: 'createName',

      align: 'center',
      sorter: true,
      render: (text) => <>{Ellipsis(text)}</>,
      width: 100,
    },
    {
      title: '创建日期', //表头显示的名称
      search: false,
      dataIndex: 'createTime',

      align: 'center',
      sorter: true,
      render: (text, record, _, action) => {
        return dayjs(record.createTime).format(dateFormat);
      },
      width: 130,
    },
    {
      title: '操作',
      valueType: 'option',
      key: 'option',
      fixed: 'right',
      align: 'center',
      width: 150,
      render: (text, record, _, action) => [
        <a
          key="viewKey"
          onClick={async () => {
            if (record.drawingName == null) {
              message.warning('该文件不能预览');
            } else {
              const filetype = record.drawingName.split('.').pop();
              if (filetype == 'pdf' || filetype == 'png' || filetype == 'jpg') {
                const drawingUrl = await getDrawingInfoPreviewUrl({ drawingId: record.drawingId });
                window.open(drawingUrl.message);
              } else {
                message.warning('该文件不能预览');
              }
            }
          }}
        >
          预览
        </a>,
        <a
          key="downloadKey"
          onClick={() => {
            downloadProductDrawingInfo({ id: record.id }).then((res) => {
              console.log(res);
              const aLink = document.createElement('a');
              document.body.appendChild(aLink);
              aLink.style.display = 'none';
              aLink.href = window.URL.createObjectURL(res);
              aLink.setAttribute('download', `${record.drawingName}`);
              aLink.click();
              document.body.removeChild(aLink);
            });
          }}
        >
          下载
        </a>,
        <a
          key="editKey"
          hidden={
            record.changeStatus === 0 &&
            !userRole?.includes('ROLE_TechManager') &&
            !userRole?.includes('ROLE_Admin')
          }
          onClick={() => {
            if (record.changeStatus == 0) {
              setModalVisit(true);
              setCreateOrUpdate(true);
              setFormTitle('审核');
            } else {
              setModalVisit2(true);
            }
            setCurrentRecord(record);
            let versionArray = new Array();
            versionArray = record.version.split('.');
            setCurrentRecordVersion(versionArray); //这里需要获取主版本和次版本后，方便在表单中分别编辑
            form.setFieldsValue({
              category: record.category,
              drawingCode: record.drawingCode,
              drawingName: record.drawingName,
              drawingSequence: record.drawingSequence,
              drawingSpec: record.drawingSpec,
              drawingUrl: record.drawingUrl,
              productCode: record.productCode,
              projectName: record.projectName,
              version: record.changeStatus === 0 ? versionArray[0] : record.version, //审核时，version为主版本号。查看时，version是版本号
              versionSecond: versionArray[1],
              id: record.id,
              reviewMemo: record.memo,
              reviewState:
                record.changeStatus == 0 ? '' : record.changeStatus == 2 ? '审核通过' : '已驳回',
            });
          }}
        >
          {record.changeStatus == 0 ? '审批' : '查看'}
        </a>,
      ],
    },
  ];

  const handleSubmit = async () => {
    setConfirmLoading(true);
    form
      .validateFields()
      .then(async () => {
        const res = { ...form.getFieldsValue() };
        let tempVersion = res.version + '.' + res.versionSecond; //将主版本号和次版本号合并，并且转化为字符串
        res.version = tempVersion;
        delete res.versionSecond;
        console.log(res);
        const result = await confirmDrawingReview(res);
        if (result != null) {
          message.success('审核成功');
          form.resetFields();
        }
        setConfirmLoading(false);
        setEditVersion(false);
        setModalVisit(false);
        actionRef.current!.reload();
      })
      .catch(() => {
        setConfirmLoading(false);
      });
  };
  // const handleSubmit = async () => {
  //   setConfirmLoading(true);
  //   form
  //     .validateFields()
  //     .then(async () => {
  //       const formValues = form.getFieldsValue();
  //       const { version, ...otherFields } = formValues; // 提取 version 字段和其他字段

  //       const res = {
  //         version: version, // 将版本号值赋给 "version" 字段
  //         ...otherFields, // 其他字段
  //       };

  //       console.log(res);
  //       const result = await confirmDrawingReview(res);
  //       if (result != null) {
  //         message.success('审核成功');
  //         form.resetFields();
  //       }
  //       setConfirmLoading(false);
  //       setModalVisit(false);
  //       actionRef.current!.reload();
  //     })
  //     .catch(() => {
  //       setConfirmLoading(false);
  //     });
  // };

  //定义Tabs的子结构的数组
  const tabList: tabType[] = [
    {
      name: 'tab1',
      label: '待审批',
      content: (
        <div>
          <ProTable
            headerTitle="图纸审批查询"
            actionRef={actionRef} //用于触发刷新操作等，看api
            rowKey="id" //表格行 key 的取值，可以是字符串或一个函数
            formRef={ref}
            // search={{
            //   labelWidth: 100,
            //   defaultCollapsed: true,
            // }}
            search={tableSearchPublicConfig}
            toolBarRender={(action, { selectedRows }) => [
              <div className="projectScheduleGroup">
                <span>原始：</span>
                <img src="../wks.gif" />
                <span>新增：</span>
                <img src="../zxz.gif" />
                <span>变更：</span>
                <img src="../zt.gif" />
              </div>,
              // <Button
              //   key="button"
              //   icon={<PlusOutlined />}
              //   onClick={() => {
              //       setCreateOrUpdate(false);
              //       setFormTitle('新建');
              //       form.resetFields();
              //       setModalVisit(true);
              //   }}
              //   type="primary"
              //   >
              //   新建
              // </Button>,
              <Button
                key="button"
                icon={<PlusOutlined />}
                onClick={() => {
                  const filter_ref = { changeStatus: 0 };
                  const filters = filterTranNew(filter_ref);
                  exportDrawingReview({
                    current: 1,
                    pageSize: 5000,
                    filters: filters,
                  }).then((res) => {
                    const aLink = document.createElement('a');
                    document.body.appendChild(aLink);
                    aLink.style.display = 'none';
                    aLink.href = window.URL.createObjectURL(res);
                    aLink.setAttribute('download', `DrawingReview.xls`);
                    aLink.click();
                    document.body.removeChild(aLink);
                  });
                }}
                type="primary"
              >
                导出
              </Button>,
            ]}
            request={async (params = {}, sort, filter) => {
              const res = { ...params, changeStatus: 0 };
              const sorters = sortTran(sort);
              const filters = filterTranNew(res);
              // result:当前页面结果，result_nofilter：当前页面数据数量
              const [result, result_nofilter] = await Promise.all([
                getDrawingReviewByPage({
                  ...params,
                  sorters: sorters,
                  filters: filters,
                }),
                getDrawingReviewByPage({
                  ...params,
                  sorters: sorters,
                  filters: [{
                    field: "changeStatus",
                    operator: "eq",
                    value: 0,
                    andOr: "and"
                  }]
                }),
              ]);
              sethandlenumber(result_nofilter.data.totalElements);
              return {
                data: result.data.content,
                total: result.data.totalElements,
                success: result.success,
              };
            }}
            columns={columns.filter(function (item) {
              return item.dataIndex != 'memo';
            })}
            scroll={{ x: 1500, y: 350 }}
            rowSelection={{}}
          />
        </div>
      ),
    },
    {
      name: 'tab2',
      label: '已通过',
      content: (
        <div>
          <ProTable
            headerTitle="BOM审批查询"
            actionRef={actionRef} //用于触发刷新操作等，看api
            rowKey="id" //表格行 key 的取值，可以是字符串或一个函数
            formRef={ref}
            // search={{
            //   labelWidth: 100,
            //   defaultCollapsed: true,
            // }}
            search={tableSearchPublicConfig}
            toolBarRender={(action, { selectedRows }) => [
              <div className="projectScheduleGroup">
                <span>原始：</span>
                <img src="../wks.gif" />
                <span>新增：</span>
                <img src="../zxz.gif" />
                <span>变更：</span>
                <img src="../zt.gif" />
              </div>,
              // <Button
              //   key="button"
              //   icon={<PlusOutlined />}
              //   onClick={() => {
              //       setCreateOrUpdate(false);
              //       setFormTitle('新建');
              //       form.resetFields();
              //       setModalVisit(true);
              //   }}
              //   type="primary"
              //   >
              //   新建
              // </Button>,
              <Button
                key="button"
                icon={<PlusOutlined />}
                onClick={() => {
                  const filter_ref = { changeStatus: 2 };
                  const filters = filterTranNew(filter_ref);
                  exportDrawingReview({
                    current: 1,
                    pageSize: 5000,
                    filters: filters,
                  }).then((res) => {
                    const aLink = document.createElement('a');
                    document.body.appendChild(aLink);
                    aLink.style.display = 'none';
                    aLink.href = window.URL.createObjectURL(res);
                    aLink.setAttribute('download', `DrawingReview.xls`);
                    aLink.click();
                    document.body.removeChild(aLink);
                  });
                }}
                type="primary"
              >
                导出
              </Button>,
            ]}
            request={async (params = {}, sort, filter) => {
              const res = { ...params, changeStatus: 2 };
              const sorters = sortTran(sort);
              const filters = filterTranNew(res);
              const result = await getDrawingReviewByPage({
                ...params,
                sorters: sorters,
                filters: filters,
              });
              // console.log(result.data.content);
              return {
                data: result.data.content,
                total: result.data.totalElements,
                success: result.success,
              };
            }}
            columns={columns}
            scroll={{ x: 1600, y: 350 }}
            rowSelection={{}}
          />
        </div>
      ),
    },
    {
      name: 'tab3',
      label: '已驳回',
      content: (
        <div>
          <ProTable
            headerTitle="图纸审批查询"
            actionRef={actionRef} //用于触发刷新操作等，看api
            rowKey="id" //表格行 key 的取值，可以是字符串或一个函数
            formRef={ref}
            // search={{
            //   labelWidth: 100,
            //   defaultCollapsed: true,
            // }}
            search={tableSearchPublicConfig}
            toolBarRender={(action, { selectedRows }) => [
              <div className="projectScheduleGroup">
                <span>原始：</span>
                <img src="../wks.gif" />
                <span>新增：</span>
                <img src="../zxz.gif" />
                <span>变更：</span>
                <img src="../zt.gif" />
              </div>,
              // <Button
              //   key="button"
              //   icon={<PlusOutlined />}
              //   onClick={() => {
              //       setCreateOrUpdate(false);
              //       setFormTitle('新建');
              //       form.resetFields();
              //       setModalVisit(true);
              //   }}
              //   type="primary"
              //   >
              //   新建
              // </Button>,
              <Button
                key="button"
                icon={<PlusOutlined />}
                onClick={() => {
                  const filter_ref = { changeStatus: 3 };
                  const filters = filterTranNew(filter_ref);
                  exportDrawingReview({
                    current: 1,
                    pageSize: 5000,
                    filters: filters,
                  }).then((res) => {
                    const aLink = document.createElement('a');
                    document.body.appendChild(aLink);
                    aLink.style.display = 'none';
                    aLink.href = window.URL.createObjectURL(res);
                    aLink.setAttribute('download', `DrawingReview.xls`);
                    aLink.click();
                    document.body.removeChild(aLink);
                  });
                }}
                type="primary"
              >
                导出
              </Button>,
            ]}
            request={async (params = {}, sort, filter) => {
              const res = { ...params, changeStatus: 3 };
              const sorters = sortTran(sort);
              const filters = filterTranNew(res);
              const result = await getDrawingReviewByPage({
                ...params,
                sorters: sorters,
                filters: filters,
              });
              // console.log(result.data.content);
              return {
                data: result.data.content,
                total: result.data.totalElements,
                success: result.success,
              };
            }}
            columns={columns}
            scroll={{ x: 1600, y: 350 }}
            rowSelection={{}}
          />
        </div>
      ),
    },
  ];

  return (
    <PageHeaderWrapper title={false} breadcrumb={undefined}>
      <Tabs
        type="card"
        items={tabList.map((item, i) => {
          const id = String(i + 1);
          return {
            label:
              i == 0 ? (
                <div className="text">
                  {item.label}
                  <div className="point">
                    <div className="number">{handlenumber}</div>
                  </div>
                </div>
              ) : (
                <div>{item.label}</div>
              ),
            key: id,
            children: <div>{item.content}</div>,
          };
        })}
      />
      <Modal
        title={formTitle}
        visible={modalVisit}
        onOk={handleSubmit}
        confirmLoading={confirmLoading}
        onCancel={() => {
          setEditVersion(false);
          setModalVisit(false);
        }}
        width={600}
        destroyOnClose
      >
        <Form
          name="wrap"
          labelCol={{ flex: '95px' }}
          labelAlign="right"
          labelWrap
          form={form}
          wrapperCol={{ flex: 1 }}
          colon={false}
        >
          <Form.Item label="id" name="id" hidden={true}>
            <Input />
          </Form.Item>
          <Form.Item
            label="项目名称"
            name="projectName"
            rules={[{ required: true, message: '请输入项目名称!' }]}
          >
            <Input disabled />
          </Form.Item>
          <Form.Item
            label="图纸类别"
            name="category"
            rules={[{ required: true, message: '请输入图纸类别!' }]}
          >
            <Input disabled />
          </Form.Item>
          <Form.Item
            label="图纸名称"
            name="drawingName"
            rules={[{ required: true, message: '请输入图纸名称!' }]}
          >
            <Input disabled />
          </Form.Item>
          <Row gutter={[50, 0]}>
            <Col span={24}>
              <Form.Item
                label="审核结果"
                name="reviewState"
                rules={[{ required: true, message: '请选择审核结果!' }]}
              >
                <Select
                  placeholder="请选择审核结果"
                  onChange={(value) => {
                    setTempReviewState(value);
                    /*                     if (value === '2') {
                      form.setFieldsValue({
                        version: Number(currentRecordVersion[0]),
                        versionSecond: Number(currentRecordVersion[1]) + 1,
                      });
                    } else if (value === '3') {
                      form.setFieldsValue({
                        version: Number(currentRecordVersion[0]),
                        versionSecond: Number(currentRecordVersion[1]),
                      });
                    } */
                  }}
                  options={[
                    { value: '2', label: '通过' },
                    { value: '3', label: '驳回' },
                  ]}
                />
              </Form.Item>
            </Col>
          </Row>
          <Row gutter={[50, 0]}>
            <Col span={24}>
              <Form.Item
                label="审核描述"
                name="reviewMemo"
                rules={[{ required: true, message: '请输入审核描述!' }]}
              >
                <Input />
              </Form.Item>
            </Col>
          </Row>
          <Row gutter={[8, 0]}>
            <Col span={12}>
              <Form.Item
                name="version"
                label="版本号"
                rules={[{ required: true, message: '请输入主版本号!' }]}
              >
                <InputNumber
                  min={Number(currentRecordVersion[0])}
                  style={{ width: '100px' }}
                  disabled={editVersion === false || tempReviewState != 2}
                  addonBefore="v"
                />
              </Form.Item>
            </Col>
            <Col span={8}>
              <Form.Item
                name="versionSecond"
                rules={[{ required: true, message: '请输入次版本号!' }]}
              >
                <InputNumber
                  min={Number(currentRecordVersion[1])}
                  style={{ width: '100px', position: 'relative', right: '80px' }}
                  disabled={editVersion === false || tempReviewState != 2}
                  addonBefore="."
                />
              </Form.Item>
            </Col>
            <Col span={2}>
              <Button
                type="link"
                style={{ width: '100px', position: 'relative', right: '120px' }}
                disabled={tempReviewState != 2}
                onClick={() => {
                  setEditVersion(!editVersion);
                  form.setFieldsValue({
                    version: Number(currentRecordVersion[0]),
                    versionSecond: Number(currentRecordVersion[1]),
                  });
                }}
              >
                {editVersion === false ? '修改版本号' : '取消修改'}
              </Button>
            </Col>
          </Row>
          {/*           <Form.Item
            label="版本号"
            name="version"
            rules={[
              ({ getFieldValue }) => ({
                validator(_, value) {
                  const currentVersion = currentRecord.version; // 获取暂存的版本号
                  const enteredVersion = value?.trim();

                  if (!enteredVersion) {
                    return Promise.reject('请输入版本号'); // 版本号为空时，直接返回错误提示
                  }

                  const currentVersionParts = currentVersion.split('.');
                  const enteredVersionParts = enteredVersion.split('.');
                  const currentVersionX1 = parseInt(currentVersionParts[0], 10);
                  const currentVersionX2 = parseInt(currentVersionParts[1], 10);
                  const enteredVersionX1 = parseInt(enteredVersionParts[0], 10);
                  const enteredVersionX2 = parseInt(enteredVersionParts[1], 10);

                  if (
                    enteredVersionX1 > currentVersionX1 ||
                    (enteredVersionX1 === currentVersionX1 && enteredVersionX2 >= currentVersionX2)
                  ) {
                    return Promise.resolve(); // 验证通过
                  }

                  return Promise.reject('版本号必须大于等于当前版本号'); // 验证失败
                },
              }),
            ]}
          >
            <Input />
          </Form.Item> */}
          {/*           <Form.Item
            label="审核结果"
            name="reviewState"
            rules={[{ required: true, message: '请选择审核结果!' }]}
          >
            <Select
              placeholder="请选择审核结果"
              onChange={() => {}}
              options={[
                { value: '2', label: '通过' },
                { value: '3', label: '驳回' },
              ]}
            />
          </Form.Item>
          <Form.Item
            label="审核描述"
            name="reviewMemo"
            rules={[{ required: true, message: '请输入审核描述!' }]}
          >
            <Input />
          </Form.Item> */}
        </Form>
      </Modal>
      <Modal
        title="查看"
        visible={modalVisit2}
        // confirmLoading={confirmLoading}
        onCancel={() => setModalVisit2(false)}
        width={600}
        destroyOnClose
        footer={[
          <Button key="back" onClick={() => setModalVisit2(false)}>
            关闭
          </Button>,
        ]}
      >
        <Form
          name="wrap"
          labelCol={{ flex: '95px' }}
          labelAlign="right"
          labelWrap
          form={form}
          wrapperCol={{ flex: 1 }}
          colon={false}
        >
          <Form.Item label="id" name="id" hidden={true}>
            <Input />
          </Form.Item>
          <Form.Item
            label="项目名称"
            name="projectName"
            rules={[{ required: true, message: '请输入项目名称!' }]}
          >
            <Input disabled />
          </Form.Item>
          <Form.Item
            label="图纸类别"
            name="category"
            rules={[{ required: true, message: '请输入图纸类别!' }]}
          >
            <Input disabled />
          </Form.Item>
          <Form.Item
            label="图纸名称"
            name="drawingName"
            rules={[{ required: true, message: '请输入图纸名称!' }]}
          >
            <Input disabled />
          </Form.Item>
          <Form.Item
            label="审核结果"
            name="reviewState"
            rules={[{ required: true, message: '请选择审核结果!' }]}
          >
            <Select
              disabled
              placeholder="请选择审核结果"
              onChange={() => {}}
              options={[
                { value: '2', label: '通过' },
                { value: '3', label: '驳回' },
              ]}
            />
          </Form.Item>
          <Form.Item
            label="审核描述"
            name="reviewMemo"
            rules={[{ required: true, message: '请输入审核描述!' }]}
          >
            <Input disabled />
          </Form.Item>
          <Form.Item
            label="版本号"
            name="version"
            rules={[{ required: true, message: '请输入版本号!' }]}
          >
            <Input disabled />
          </Form.Item>
        </Form>
      </Modal>
    </PageHeaderWrapper>
  );
};
export default DrawingReview;
